<template>
	<el-container>
		<el-header>
			<el-row>
				<el-col span="12">
					扬工院智慧停车管理后台
				</el-col>
				<el-col span="12" style="text-align: right;">
					<el-button type="primary" @click="logout()">注销登录</el-button>
				</el-col>
			</el-row>			
		</el-header>
		<el-container>
			<el-aside>
				<el-menu default-active="1">
					<el-menu-item index="1">
						 <i class="el-icon-s-custom"></i>
						<span @click="$router.replace('/userlist')">注册用户</span>
					</el-menu-item>
					<el-menu-item index="2">
						<i class="el-icon-position"></i>
						<span @click="$router.replace('/parkingspacelist')">车位状态</span>
					</el-menu-item>
					<el-menu-item index="3">
						<i class="el-icon-chat-line-square"></i>
						<span @click="$router.replace('/parkingrecord')">停车记录</span>
					</el-menu-item>
					<el-menu-item index="4">
						<i class="el-icon-chat-line-square"></i>
						<span @click="$router.replace('/recharge')">账户充值</span>
					</el-menu-item>
				</el-menu>
			</el-aside>
			<el-container>
				<el-main>
					 <router-view></router-view>
				</el-main>
				<el-footer>
					<el-col span="12">
						Copyright ©2023 <a href="http://www.ypi.edu.cn/">扬州工业职业技术学院</a> , All Rights Reserved
					</el-col>
					<el-col span="12" style="text-align: right;">
						Version 1.0
					</el-col>
				</el-footer>
			</el-container>
		</el-container>
	</el-container>
</template>

<script>
	export default{
		data() {
			return {
				
			}
		},
		methods: {
			logout() {
				this.$confirm("是否要注销本次登录？","提示",{
					confirmButtonText:"确定",
					cancelButtonText:"取消",
					type:"waring"
				}).then(()=>{
					this.$router.push('/login');
					this.$message({
						type:"success",
						message:"注销成功"
					})
				})
			}
		},
		
	}
	
	
</script>

<style>
	.el-header{
		background-color: #409EFF;
		color: #FFFFFF;
		line-height: 60px;
	}
	.el-aside{
		background-color: #EEF1F6;
		height: 950px;
	}
	.el-footer{
		background-color:#409EFF ;
		color: #FFFFFF;
		line-height: 60px;
		font-size: 14px;
	}
	.el-menu{
		background-color: #EEF1F6;
		padding-left: 0 !important;
		text-align: center;
	}
</style>
